package com.xyz.FileTest.FileOrDir;

import java.io.File;
import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        File f1 = new File("/Users/chutianshu/1.cap");
        File f2 = new File("/Users/chutianshu/");
        File f3 = new File("/Users/chutianshu/nothing");
        System.out.println(f1.isFile());
        System.out.println(f1.isDirectory());
        System.out.println(f2.isFile());
        System.out.println(f2.isDirectory());
        System.out.println(f3.isFile());
        System.out.println(f3.isDirectory());
    }
}
